package com.ruoyi.bookkeeping.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.bookkeeping.domain.BookAsset;
import com.ruoyi.bookkeeping.domain.BookDynamic;
import com.ruoyi.bookkeeping.domain.param.AddBookDynamicParam;
import com.ruoyi.bookkeeping.domain.param.UpdateBookDynamicParam;
import com.ruoyi.bookkeeping.domain.vo.BookDynamicVo;

/**
 * 动态Service接口
 * 
 * @author ruoyi
 * @date 2023-02-24
 */
public interface IBookDynamicService extends IService<BookDynamic>
{
    /**
     * 查询动态
     * 
     * @param dynamicId 动态主键
     * @return 动态
     */
    public BookDynamic selectBookDynamicByDynamicId(Long dynamicId);

    /**
     * 查询动态列表
     * @param userId
     * @return
     */
    public List<BookDynamicVo> selectBookDynamicList(Long userId);

    /**
     * 新增动态
     * @param addBookDynamicParam
     * @param userId
     * @return
     */
    public int insertBookDynamic(AddBookDynamicParam addBookDynamicParam,Long userId);

    /**
     * 修改动态
     * @param updateBookDynamicParam
     * @param userId
     * @return
     */
    public int updateBookDynamic(UpdateBookDynamicParam updateBookDynamicParam,Long userId);

    /**
     * 删除动态
     * @param dynamicId
     * @param userId
     * @return
     */
    public int deleteBookDynamicByDynamicId(Long dynamicId,Long userId);

    /**
     * 点赞或取消点赞动态
     * @param dynamicId
     * @param userId
     * @return
     */
    int goodBookDynamic(Long dynamicId, Long userId,Long goodOrCancle);
}
